<?php
  define('CSS_JS_VERSION', '1.0.0_Beta');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="pl" />
    <title>My Space | Volkswagen Group Polska</title>
    <link media="screen" rel="stylesheet" href="/css/bootstrap.css">
    <link media="screen" rel="stylesheet" href="/css/font-awesome.css">
    <link media="screen" rel="stylesheet" href="/css/iCheck.css">
    <link media="screen" rel="stylesheet" href="/css/select2.css">
    <link media="screen" rel="stylesheet" href="/css/style.css">
    <link rel="Shortcut icon" href="/favicon.ico?ver=1.1" />
  </head>
  <body>
    <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true"></div>
    <div class="rightMenu">
      <span class="changeLang" data-lang="pl">PL</span>
      <span class="changeLang" data-lang="en">EN</span>
    </div>
    <div id="mainContainer">
      <div id="page">
        <div id="pageContent" class="center">
          <div id="head">
            <a href="/"><div id="headC"></div></a>
          </div>
          <div id="container">
            <div id="headContainer">
              <nav class="navbar navbar-default" role="navigation">
                <div class="container-fluid">
                  <div class="navbar-header">
                    <a id="gotoHome" class="navbar-brand" href="/">My Space</a>
                  </div>
                  <div id="userContainer"></div>
                </div><!-- /.container-fluid -->
              </nav>
            </div>
            <div id="bodyContainer"></div>
          </div>
        </div>
      </div>
      <div id="foot">
        <div id="footHolder" class="center">
          <a id="footercreated" onclick="javascript:this.target='_blank';" title="Created by Gmind Software House" href="http://www.gmind.pl"></a>
            <p>
              © Volkswagen Group Polska 2013 | 
              <a onclick="javascript:this.target='_blank'" href="http://vw-group.pl/">www.vw-group.pl</a>
            </p>
            <p style="display: block; text-align: right; width: 960px;">
              PP <?php echo CSS_JS_VERSION ?>
            </p>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>

    <div id="preloader" style="display: none;">
      <img src="/images/preloader.gif" />
      <div class="preloader-background"></div>
    </div>

    <?php require('/js/templates/main.php'); ?>
    <?php require('/js/templates/tile.php'); ?>
    <?php require('/js/templates/appMenu.php'); ?>
    <?php require('/js/templates/userInfo.php'); ?>
    <?php require('/js/templates/userList.php'); ?>
    <?php require('/js/templates/userListRow.php'); ?>
    <?php require('/js/templates/groupList.php'); ?>
    <?php require('/js/templates/groupListRow.php'); ?>
    <?php require('/js/templates/dialogPersonalize.php'); ?>
    <?php require('/js/templates/dialogComManagement.php'); ?>
    <?php require('/js/templates/dialogAddUserGroup.php'); ?>
    <?php require('/js/templates/dialogMessage.php'); ?>

    <script id="mainLoaderTemplate" type="text/template"></script>
    <script id="mainTemplate" type="text/template"></script>
    <script id="tileTemplate" type="text/template"></script>
    <script id="appMenuTemplate" type="text/template"></script>
    <script id="userInfoMoreTemplate" type="text/template"></script>
    <script id="userInfoTemplate" type="text/template"></script>
    <script id="userListTemplate" type="text/template"></script>
    <script id="userListRowTemplate" type="text/template"></script>
    <script id="groupListTemplate" type="text/template"></script>
    <script id="groupListRowTemplate" type="text/template"></script>
    <script id="dialogPresonalizeTemplate" type="text/template"></script>
    <script id="dialogComManagementTemplate" type="text/template"></script>
    <script id="dialogAddUserGroupTemplate" type="text/template"></script>
    <script id="dialogMessageTemplate" type="text/template"></script>
    <script src="/js/libs/jquery-1.11.0.min.js" type="text/javascript"></script>
    <script src="/js/libs/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
    <script src="/js/libs/jquery-ui-1.10.4.custom.js" type="text/javascript"></script>
    <script src="/js/libs/masonry.old.js" type="text/javascript"></script>
    <script src="/js/libs/underscore.js" type="text/javascript"></script>
    <script src="/js/libs/backbone.js" type="text/javascript"></script>
    <script src="/js/libs/backbone.routefilter.min.js" type="text/javascript"></script>
    <script src="/js/libs/pekeUpload.js" type="text/javascript"></script>
    <script src="/js/libs/icheck.min.js" type="text/javascript"></script>
    <script src="/js/libs/jquery.imgpreload.min.js" type="text/javascript"></script>
    <script src="/js/libs/select2.min.js" type="text/javascript"></script>
    <script src="/js/libs/bootstrap.min.js" type="text/javascript"></script>
    <script src="/js/app.config.js" type="text/javascript"></script>
    <script src="/js/app.be.client.js" type="text/javascript"></script>
    <script src="/js/app.js" type="text/javascript"></script>
    <script src="/js/app.models.js" type="text/javascript"></script>
    <script src="/js/app.trans.pl-PL.js" type="text/javascript"></script>
    <script src="/js/app.trans.en-EN.js" type="text/javascript"></script>
    <script src="/js/views/main.js" type="text/javascript"></script>
    <script src="/js/views/tile.js" type="text/javascript"></script>
    <script src="/js/views/appMenu.js" type="text/javascript"></script>
    <script src="/js/views/userInfo.js" type="text/javascript"></script>
    <script src="/js/views/userList.js" type="text/javascript"></script>
    <script src="/js/views/userListRow.js" type="text/javascript"></script>
    <script src="/js/views/groupList.js" type="text/javascript"></script>
    <script src="/js/views/groupListRow.js" type="text/javascript"></script>
    <script src="/js/views/dialogPersonalize.js" type="text/javascript"></script>
    <script src="/js/views/dialogComManagement.js" type="text/javascript"></script>
    <script src="/js/views/dialogAddUserGroup.js" type="text/javascript"></script>
    <script src="/js/views/dialogMessage.js" type="text/javascript"></script>
    
    <script type="text/javascript">
      var IP = '<?php echo $_SERVER['REMOTE_ADDR']; ?>';
      var lang = '';
      var segments = window.location.pathname.split('/');
      segments.shift();
      if (segments[0] != undefined) {
        var lang = segments[0];
      }
      if (lang != '') {
        if (LANGUAGES.indexOf(lang) == -1) {
          lang = DEFAULT_LANGUAGE;
        }
      } else {
        lang = DEFAULT_LANGUAGE;
      }
      var router = new APP.Routers.MainRouter({language: lang});
    </script>
  </body>
</html>